<ion-view view-title="商品管理" class="productmanager">
	<ion-nav-bar ng-class="baseclass">
		<ion-nav-back-button></ion-nav-back-button>
	</ion-nav-bar>
	
	<div class="bar bar-subheader padding-0">
		<div class="row top">
			<div class="col" data-authname="销售中商品" rights-ctrl on-tap="activeSlide(0)" ng-class="selectTab==0?'top-activated':''">
				销售中商品
			</div>
			<div class="col" data-authname="待上架商品" rights-ctrl on-tap="activeSlide(1)" ng-class="selectTab==1?'top-activated':''">
				待上架商品
			</div>
		</div>
	</div>

	<!--描述：滑动块-->
	<ion-side-menus>
		<ion-side-menu-content drag-content="false">
			<ion-content class="has-header has-subheader has-footer bg">
				
				<div class="row text-center orderBar">
					<div class="col">
						<div class="item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 5px;font-size:14px;height: 20px;">
							<div class="input-value" ng-click="doSelectSort()">{{input.order_select.name}}</div>
						</div>
					</div>
					<div class="col" on-tap="openRightMenu()">
						条件筛选<i class="iconfont icon-shaixuan"></i>
					</div>
				</div>
				
				<ion-slide-box delegate-handle="tab-handle" on-touch="onTouch()" on-release="onRelease()" draw-slide="false" on-slide-changed="slideChanged(index)" active-slide="slideIndex" show-pager="false">
					<ion-slide data-authname="销售中商品" data-type="slide" rights-ctrl>
						<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
							<!--描述：下拉刷新-->
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
							
							<!--未找到商品-->
							<div class="noGoods" ng-if="!data_goods.goods">
								<img src="./img/guilin/other/icon_spw@2x.png"/>
								<div class="text">未找到商品</div>
							</div>
							
							<ul class="list">
								<div class= "goodsrow" ng-repeat="goods in data_goods.goods track by $index">
									<li class="item item-thumbnail-left goodsItem" on-tap="onshow_detail(goods.goods_id)">
										<img src="{{goods.image_default||noImg}}"/>
										<img src="{{goods.isCheckIcon?'./img/guilin/other/seller_gx.png':'./img/guilin/other/seller_no_gx.png'}}" class="check" on-tap="getOne($index,$event)"/>
										<div class="row">
									 		<div class="col-67 padding-0">
									 			<p class="ellipsis-2 goodsName">{{goods.name}}</p>
									 			<div class="brand">品牌：{{goods.brand_name}}<span class="right-zhang">{{goods.store}}</span></div>
									 			<div class="brand">发布：{{goods.uptime}}</div>
									 			<div class="tag" ng-repeat="tag in goods.goods_tags" style="background-color:{{tag.tag_bgcolor}};color: {{tag.tag_fgcolor}} ;">{{tag.tag_name}}</div>
									 		</div>
									 		<div class="col-33 text-right">
									 			<p class="price">{{goods.price | currency:'¥'}}</p>
									 			<p class="baoyou" ng-if="goods.hastax">(含税)</p>
									 			<p class="baoyou" ng-if="!goods.is_free">(包邮)</p>
									 			<p class="brand">已售{{goods.buy_count}}件</p>
									 		</div>
									 	</div>
									</li>
									<li class="item buttonItem">
										<div class="btn gray" on-tap="goods_update(goods.goods_id,false)">商品下架</div>
										<div class="btn blue" on-tap="openModal_tag(goods.goods_id)">加个标签</div>
									</li>
								</div>
							</ul>
							<!--描述：当用户到达页脚或页脚附近时-->
							<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
						</ion-scroll>
					</ion-slide>


					<!--待上架的商品-->
					<ion-slide data-authname="待上架商品" data-type="slide" rights-ctrl>
						<ion-scroll direction="y" ng-style="myObj" lazy-scroll>
							<!--描述：下拉刷新-->
							<ion-refresher pulling-text="下拉刷新..." on-refresh="doRefresh()"></ion-refresher>
								<!--未找到商品-->
							<div class="noGoods" ng-if="!goods_waitSale.goods">
								<img src="./img/guilin/other/icon_spw@2x.png"/>
								<div class="text">未找到商品</div>
							</div>
							
							<ul class="list">
								<div class= "goodsrow" ng-repeat="goods in goods_waitSale.goods track by $index">
									<li class="item item-thumbnail-left goodsItem">
										<img src="{{goods.image_default||noImg}}"/>
										<img src="{{goods.isCheckIcon?'./img/guilin/other/seller_gx.png':'./img/guilin/other/seller_no_gx.png'}}" class="check" on-tap="getOne($index,$event)"/>
										<div class="row padding-0">
									 		<div class="col-67 padding-0">
									 			<p class="ellipsis-2 goodsName">{{goods.name}}</p>
									 			<div class="brand">品牌：bear小熊<span class="right-zhang">{{goods.store}}</span></div>
									 			<div class="tag ellipsis" ng-repeat="tag in goods.goods_tags" style="background-color:{{tag.tag_bgcolor}};color: {{tag.tag_fgcolor}} ;">{{tag.tag_name}}</div>
									 		</div>
									 		<div class="col-33 text-right">
									 			<p class="price">{{goods.price | currency:'¥'}}</p>
									 			<p class="baoyou">(含税)</p>
									 			<p class="baoyou">(包邮)</p>
									 		</div>
									 	</div>
									</li>
									<li class="item buttonItem">
										<div class="btn ora" on-tap="goods_update(goods.goods_id,true)">商品上架</div>
										<div class="btn blue" on-tap="openModal_tag(goods.goods_id)">加个标签</div>
									</li>
								</div>
							</ul>
							
							<!--描述：当用户到达页脚或页脚附近时-->
							<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
						</ion-scroll>
					</ion-slide>
				</ion-slide-box>
				<ion-infinite-scroll ng-if="!isLoad" immediate-check="false" on-infinite="doRefreshMore()" distance="1%"></ion-infinite-scroll>
			</ion-content>
			<!--底部导航-->
			<div class="bar bar-footer padding-0">
				<img src="{{isCheckIconAll?'./img/guilin/other/seller_gx.png':'./img/guilin/other/seller_no_gx.png'}}" on-tap="getAll()"/><span class="allCheck">全选</span>
				<div class="btn" ng-class="selectTab==0?'gray':'ora'" ng-bind="selectTab==0?'商品下架':'商品上架'" on-tap="goods_update_many()"></div>
				<div class="btn blue" on-tap="openModal_tag()">加个标签</div>
			</div>
			
		</ion-side-menu-content>
		
		
		
		<ion-side-menu side="right">
			<!--<ion-content class="menu">-->
				<div class="list menu">
					<li class="item item-input item-borderless">
			   	  	  	<input type="text" placeholder="请输入内容" class="searchInput" ng-model="input.key"/>
						<!--<i class="icon ion-android-close placeholder-icon font-1rem-my" on-tap="initKey()"></i>-->
					</li>
					<li class="item titleItem item-borderless">
						类型
					</li>
					<li class="item item-borderless">
						<div class="row typeDiv padding-0">
							<div class="col" ng-click="getType($event,'new')">普通<img src="./img/guilin/other/goods_type_selected.png" class="xz notShow"/></div>
							<div class="col" ng-click="getType($event,'second')">二手<img src="./img/guilin/other/goods_type_selected.png" class="xz notShow"/></div>
							<div class="col" ng-click="getType($event,'unsalable')">滞销<img src="./img/guilin/other/goods_type_selected.png" class="xz notShow"/></div>
						</div>
						<div class="row typeDiv padding-0">
							<div class="col" ng-click="getType($event,'rent')">租赁<img src="./img/guilin/other/goods_type_selected.png" class="xz notShow"/></div>
							<div class="col" ng-click="getType($event,'transfer')">转让<img src="./img/guilin/other/goods_type_selected.png" class="xz notShow"/></div>
							<div class="col" ng-click="getType($event,'parts')">配件<img src="./img/guilin/other/goods_type_selected.png" class="xz notShow"/></div>
						</div>
					</li>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 5px;font-size:14px;">
						<div class="selectTitle">品牌</div>
						<div class="input-value" ng-click="doSelectBrand()">{{filter.brand_select.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 5px;font-size:14px;">
						<div class="selectTitle">产品类目</div>
						<div class="input-value" ng-click="doSelectCat1()">{{input.cat1.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 5px;font-size:14px;">
						<div class="selectTitle"></div>
						<div class="input-value" ng-click="doSelectCat2()">{{input.cat2.name}}</div>
					</div>
					<div class="item item-input item-select" data-tap-disabled="true" style="padding:0 30px 0 5px;font-size:14px;">
						<div class="selectTitle"></div>
						<div class="input-value" ng-click="doSelectCat3()">{{input.cat3.name}}</div>
					</div>
					<li class="item titleItem item-borderless">
						价格区间
					</li>
					<li class="item item-borderless item-input-inset priceItem">
						<input type="text" placeholder="最低价" class="col col-40 text-center" ng-model="filter.price_from" />
						<div class="col col-20 text-center" style="background-color: #F5F5F5;">—</div>
						<input type="text" placeholder="最高价" class="col col-40 text-center" ng-model="filter.price_to" />
					</li>
				</div>
				<div class="footer row padding-0" >
					<div class="col baseBtn" on-tap="reset()">重置</div>
					<div class="col baseBtn blue" on-tap="search()">完成</div>
				</div>
			<!--</ion-content>-->
		</ion-side-menu>
		
	</ion-side-menus>
</ion-view>